using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VFSWERT
    {
        public DataRow Convert2FSWERT(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryFSWERT(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["FSWMANDANT"] = " ".PadRight(2 ); 
         dwReturn["FSWPART"] = " ".PadRight(5 ); 
         dwReturn["FSWART"] = " ".PadRight(20 ); 
         dwReturn["FSWVAR"] = " ".PadRight(2 ); 
         dwReturn["FSWAENZL"] = " ".PadRight(0 ); 
         dwReturn["FSWAENB"] = " ".PadRight(8 ); 
         dwReturn["FSWAEND"] = " ".PadRight(0 ); 
         dwReturn["FSWNEUB"] = " ".PadRight(8 ); 
         dwReturn["FSWNEUD"] = " ".PadRight(0 ); 
         dwReturn["FSWPRVH"] = " ".PadRight(0 ); 
         dwReturn["FSWPRAK"] = " ".PadRight(0 ); 
         dwReturn["FSWPRKU"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART01"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP01"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH01"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK01"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU01"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART02"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP02"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH02"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK02"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU02"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART03"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP03"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH03"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK03"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU03"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART04"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP04"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH04"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK04"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU04"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART05"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP05"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH05"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK05"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU05"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART06"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP06"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH06"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK06"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU06"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART07"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP07"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH07"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK07"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU07"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART08"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP08"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH08"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK08"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU08"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART09"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP09"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH09"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK09"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU09"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART10"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP10"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH10"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK10"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU10"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART11"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP11"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH11"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK11"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU11"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART12"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP12"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH12"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK12"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU12"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART13"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP13"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH13"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK13"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU13"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART14"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP14"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH14"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK14"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU14"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART15"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP15"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH15"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK15"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU15"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART16"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP16"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH16"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK16"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU16"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART17"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP17"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH17"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK17"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU17"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART18"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP18"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH18"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK18"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU18"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART19"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP19"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH19"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK19"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU19"] = " ".PadRight(0 ); 
         dwReturn["FSWZUART20"] = " ".PadRight(1 ); 
         dwReturn["FSWPRGRP20"] = " ".PadRight(1 ); 
         dwReturn["FSWZUABVH20"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABAK20"] = " ".PadRight(0 ); 
         dwReturn["FSWZUABKU20"] = " ".PadRight(0 ); 
         dwReturn["FSWZS01"] = " ".PadRight(2 ); 
         dwReturn["FSWZSABVH01"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABAK01"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABKU01"] = " ".PadRight(0 ); 
         dwReturn["FSWZS02"] = " ".PadRight(2 ); 
         dwReturn["FSWZSABVH02"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABAK02"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABKU02"] = " ".PadRight(0 ); 
         dwReturn["FSWZS03"] = " ".PadRight(2 ); 
         dwReturn["FSWZSABVH03"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABAK03"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABKU03"] = " ".PadRight(0 ); 
         dwReturn["FSWZS04"] = " ".PadRight(2 ); 
         dwReturn["FSWZSABVH04"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABAK04"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABKU04"] = " ".PadRight(0 ); 
         dwReturn["FSWZS05"] = " ".PadRight(2 ); 
         dwReturn["FSWZSABVH05"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABAK05"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABKU05"] = " ".PadRight(0 ); 
         dwReturn["FSWZS06"] = " ".PadRight(2 ); 
         dwReturn["FSWZSABVH06"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABAK06"] = " ".PadRight(0 ); 
         dwReturn["FSWZSABKU06"] = " ".PadRight(0 ); 
         dwReturn["FSWFILLER"] = " ".PadRight(75 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapFSWERT(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveFSWERT(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryFSWERT(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapFSWERT(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertFSWERT(dwLocal, ITXDBVERSION);
            }
            UpdateFSWERT(dwLocal);
        }
        public void InsertFSWERT(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO FSWERT(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryFSWERT(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM FSWERT WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM FSWERT  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "FSWERT";
            Return = Result;
            return Return;
        }
        public void DeleteFSWERT(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM FSWERT   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateFSWERT(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE FSWERT SET "
                    +"FSWMANDANT= :FSWMANDANT,"
                    +"FSWPART= :FSWPART,"
                    +"FSWART= :FSWART,"
                    +"FSWVAR= :FSWVAR,"
                    +"FSWAENZL= :FSWAENZL,"
                    +"FSWAENB= :FSWAENB,"
                    +"FSWAEND= :FSWAEND,"
                    +"FSWNEUB= :FSWNEUB,"
                    +"FSWNEUD= :FSWNEUD,"
                    +"FSWPRVH= :FSWPRVH,"
                    +"FSWPRAK= :FSWPRAK,"
                    +"FSWPRKU= :FSWPRKU,"
                    +"FSWZUART01= :FSWZUART01,"
                    +"FSWPRGRP01= :FSWPRGRP01,"
                    +"FSWZUABVH01= :FSWZUABVH01,"
                    +"FSWZUABAK01= :FSWZUABAK01,"
                    +"FSWZUABKU01= :FSWZUABKU01,"
                    +"FSWZUART02= :FSWZUART02,"
                    +"FSWPRGRP02= :FSWPRGRP02,"
                    +"FSWZUABVH02= :FSWZUABVH02,"
                    +"FSWZUABAK02= :FSWZUABAK02,"
                    +"FSWZUABKU02= :FSWZUABKU02,"
                    +"FSWZUART03= :FSWZUART03,"
                    +"FSWPRGRP03= :FSWPRGRP03,"
                    +"FSWZUABVH03= :FSWZUABVH03,"
                    +"FSWZUABAK03= :FSWZUABAK03,"
                    +"FSWZUABKU03= :FSWZUABKU03,"
                    +"FSWZUART04= :FSWZUART04,"
                    +"FSWPRGRP04= :FSWPRGRP04,"
                    +"FSWZUABVH04= :FSWZUABVH04,"
                    +"FSWZUABAK04= :FSWZUABAK04,"
                    +"FSWZUABKU04= :FSWZUABKU04,"
                    +"FSWZUART05= :FSWZUART05,"
                    +"FSWPRGRP05= :FSWPRGRP05,"
                    +"FSWZUABVH05= :FSWZUABVH05,"
                    +"FSWZUABAK05= :FSWZUABAK05,"
                    +"FSWZUABKU05= :FSWZUABKU05,"
                    +"FSWZUART06= :FSWZUART06,"
                    +"FSWPRGRP06= :FSWPRGRP06,"
                    +"FSWZUABVH06= :FSWZUABVH06,"
                    +"FSWZUABAK06= :FSWZUABAK06,"
                    +"FSWZUABKU06= :FSWZUABKU06,"
                    +"FSWZUART07= :FSWZUART07,"
                    +"FSWPRGRP07= :FSWPRGRP07,"
                    +"FSWZUABVH07= :FSWZUABVH07,"
                    +"FSWZUABAK07= :FSWZUABAK07,"
                    +"FSWZUABKU07= :FSWZUABKU07,"
                    +"FSWZUART08= :FSWZUART08,"
                    +"FSWPRGRP08= :FSWPRGRP08,"
                    +"FSWZUABVH08= :FSWZUABVH08,"
                    +"FSWZUABAK08= :FSWZUABAK08,"
                    +"FSWZUABKU08= :FSWZUABKU08,"
                    +"FSWZUART09= :FSWZUART09,"
                    +"FSWPRGRP09= :FSWPRGRP09,"
                    +"FSWZUABVH09= :FSWZUABVH09,"
                    +"FSWZUABAK09= :FSWZUABAK09,"
                    +"FSWZUABKU09= :FSWZUABKU09,"
                    +"FSWZUART10= :FSWZUART10,"
                    +"FSWPRGRP10= :FSWPRGRP10,"
                    +"FSWZUABVH10= :FSWZUABVH10,"
                    +"FSWZUABAK10= :FSWZUABAK10,"
                    +"FSWZUABKU10= :FSWZUABKU10,"
                    +"FSWZUART11= :FSWZUART11,"
                    +"FSWPRGRP11= :FSWPRGRP11,"
                    +"FSWZUABVH11= :FSWZUABVH11,"
                    +"FSWZUABAK11= :FSWZUABAK11,"
                    +"FSWZUABKU11= :FSWZUABKU11,"
                    +"FSWZUART12= :FSWZUART12,"
                    +"FSWPRGRP12= :FSWPRGRP12,"
                    +"FSWZUABVH12= :FSWZUABVH12,"
                    +"FSWZUABAK12= :FSWZUABAK12,"
                    +"FSWZUABKU12= :FSWZUABKU12,"
                    +"FSWZUART13= :FSWZUART13,"
                    +"FSWPRGRP13= :FSWPRGRP13,"
                    +"FSWZUABVH13= :FSWZUABVH13,"
                    +"FSWZUABAK13= :FSWZUABAK13,"
                    +"FSWZUABKU13= :FSWZUABKU13,"
                    +"FSWZUART14= :FSWZUART14,"
                    +"FSWPRGRP14= :FSWPRGRP14,"
                    +"FSWZUABVH14= :FSWZUABVH14,"
                    +"FSWZUABAK14= :FSWZUABAK14,"
                    +"FSWZUABKU14= :FSWZUABKU14,"
                    +"FSWZUART15= :FSWZUART15,"
                    +"FSWPRGRP15= :FSWPRGRP15,"
                    +"FSWZUABVH15= :FSWZUABVH15,"
                    +"FSWZUABAK15= :FSWZUABAK15,"
                    +"FSWZUABKU15= :FSWZUABKU15,"
                    +"FSWZUART16= :FSWZUART16,"
                    +"FSWPRGRP16= :FSWPRGRP16,"
                    +"FSWZUABVH16= :FSWZUABVH16,"
                    +"FSWZUABAK16= :FSWZUABAK16,"
                    +"FSWZUABKU16= :FSWZUABKU16,"
                    +"FSWZUART17= :FSWZUART17,"
                    +"FSWPRGRP17= :FSWPRGRP17,"
                    +"FSWZUABVH17= :FSWZUABVH17,"
                    +"FSWZUABAK17= :FSWZUABAK17,"
                    +"FSWZUABKU17= :FSWZUABKU17,"
                    +"FSWZUART18= :FSWZUART18,"
                    +"FSWPRGRP18= :FSWPRGRP18,"
                    +"FSWZUABVH18= :FSWZUABVH18,"
                    +"FSWZUABAK18= :FSWZUABAK18,"
                    +"FSWZUABKU18= :FSWZUABKU18,"
                    +"FSWZUART19= :FSWZUART19,"
                    +"FSWPRGRP19= :FSWPRGRP19,"
                    +"FSWZUABVH19= :FSWZUABVH19,"
                    +"FSWZUABAK19= :FSWZUABAK19,"
                    +"FSWZUABKU19= :FSWZUABKU19,"
                    +"FSWZUART20= :FSWZUART20,"
                    +"FSWPRGRP20= :FSWPRGRP20,"
                    +"FSWZUABVH20= :FSWZUABVH20,"
                    +"FSWZUABAK20= :FSWZUABAK20,"
                    +"FSWZUABKU20= :FSWZUABKU20,"
                    +"FSWZS01= :FSWZS01,"
                    +"FSWZSABVH01= :FSWZSABVH01,"
                    +"FSWZSABAK01= :FSWZSABAK01,"
                    +"FSWZSABKU01= :FSWZSABKU01,"
                    +"FSWZS02= :FSWZS02,"
                    +"FSWZSABVH02= :FSWZSABVH02,"
                    +"FSWZSABAK02= :FSWZSABAK02,"
                    +"FSWZSABKU02= :FSWZSABKU02,"
                    +"FSWZS03= :FSWZS03,"
                    +"FSWZSABVH03= :FSWZSABVH03,"
                    +"FSWZSABAK03= :FSWZSABAK03,"
                    +"FSWZSABKU03= :FSWZSABKU03,"
                    +"FSWZS04= :FSWZS04,"
                    +"FSWZSABVH04= :FSWZSABVH04,"
                    +"FSWZSABAK04= :FSWZSABAK04,"
                    +"FSWZSABKU04= :FSWZSABKU04,"
                    +"FSWZS05= :FSWZS05,"
                    +"FSWZSABVH05= :FSWZSABVH05,"
                    +"FSWZSABAK05= :FSWZSABAK05,"
                    +"FSWZSABKU05= :FSWZSABKU05,"
                    +"FSWZS06= :FSWZS06,"
                    +"FSWZSABVH06= :FSWZSABVH06,"
                    +"FSWZSABAK06= :FSWZSABAK06,"
                    +"FSWZSABKU06= :FSWZSABKU06,"
                    +"FSWFILLER= :FSWFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("FSWMANDANT", OracleType.NVarChar).Value = dwData["FSWMANDANT"].ToString(); 
          or1.Parameters.Add("FSWPART", OracleType.NVarChar).Value = dwData["FSWPART"].ToString(); 
          or1.Parameters.Add("FSWART", OracleType.NVarChar).Value = dwData["FSWART"].ToString(); 
          or1.Parameters.Add("FSWVAR", OracleType.NVarChar).Value = dwData["FSWVAR"].ToString(); 
          or1.Parameters.Add("FSWAENZL", OracleType.NVarChar).Value = dwData["FSWAENZL"].ToString(); 
          or1.Parameters.Add("FSWAENB", OracleType.NVarChar).Value = dwData["FSWAENB"].ToString(); 
          or1.Parameters.Add("FSWAEND", OracleType.NVarChar).Value = dwData["FSWAEND"].ToString(); 
          or1.Parameters.Add("FSWNEUB", OracleType.NVarChar).Value = dwData["FSWNEUB"].ToString(); 
          or1.Parameters.Add("FSWNEUD", OracleType.NVarChar).Value = dwData["FSWNEUD"].ToString(); 
          or1.Parameters.Add("FSWPRVH", OracleType.NVarChar).Value = dwData["FSWPRVH"].ToString(); 
          or1.Parameters.Add("FSWPRAK", OracleType.NVarChar).Value = dwData["FSWPRAK"].ToString(); 
          or1.Parameters.Add("FSWPRKU", OracleType.NVarChar).Value = dwData["FSWPRKU"].ToString(); 
          or1.Parameters.Add("FSWZUART01", OracleType.NVarChar).Value = dwData["FSWZUART01"].ToString(); 
          or1.Parameters.Add("FSWPRGRP01", OracleType.NVarChar).Value = dwData["FSWPRGRP01"].ToString(); 
          or1.Parameters.Add("FSWZUABVH01", OracleType.NVarChar).Value = dwData["FSWZUABVH01"].ToString(); 
          or1.Parameters.Add("FSWZUABAK01", OracleType.NVarChar).Value = dwData["FSWZUABAK01"].ToString(); 
          or1.Parameters.Add("FSWZUABKU01", OracleType.NVarChar).Value = dwData["FSWZUABKU01"].ToString(); 
          or1.Parameters.Add("FSWZUART02", OracleType.NVarChar).Value = dwData["FSWZUART02"].ToString(); 
          or1.Parameters.Add("FSWPRGRP02", OracleType.NVarChar).Value = dwData["FSWPRGRP02"].ToString(); 
          or1.Parameters.Add("FSWZUABVH02", OracleType.NVarChar).Value = dwData["FSWZUABVH02"].ToString(); 
          or1.Parameters.Add("FSWZUABAK02", OracleType.NVarChar).Value = dwData["FSWZUABAK02"].ToString(); 
          or1.Parameters.Add("FSWZUABKU02", OracleType.NVarChar).Value = dwData["FSWZUABKU02"].ToString(); 
          or1.Parameters.Add("FSWZUART03", OracleType.NVarChar).Value = dwData["FSWZUART03"].ToString(); 
          or1.Parameters.Add("FSWPRGRP03", OracleType.NVarChar).Value = dwData["FSWPRGRP03"].ToString(); 
          or1.Parameters.Add("FSWZUABVH03", OracleType.NVarChar).Value = dwData["FSWZUABVH03"].ToString(); 
          or1.Parameters.Add("FSWZUABAK03", OracleType.NVarChar).Value = dwData["FSWZUABAK03"].ToString(); 
          or1.Parameters.Add("FSWZUABKU03", OracleType.NVarChar).Value = dwData["FSWZUABKU03"].ToString(); 
          or1.Parameters.Add("FSWZUART04", OracleType.NVarChar).Value = dwData["FSWZUART04"].ToString(); 
          or1.Parameters.Add("FSWPRGRP04", OracleType.NVarChar).Value = dwData["FSWPRGRP04"].ToString(); 
          or1.Parameters.Add("FSWZUABVH04", OracleType.NVarChar).Value = dwData["FSWZUABVH04"].ToString(); 
          or1.Parameters.Add("FSWZUABAK04", OracleType.NVarChar).Value = dwData["FSWZUABAK04"].ToString(); 
          or1.Parameters.Add("FSWZUABKU04", OracleType.NVarChar).Value = dwData["FSWZUABKU04"].ToString(); 
          or1.Parameters.Add("FSWZUART05", OracleType.NVarChar).Value = dwData["FSWZUART05"].ToString(); 
          or1.Parameters.Add("FSWPRGRP05", OracleType.NVarChar).Value = dwData["FSWPRGRP05"].ToString(); 
          or1.Parameters.Add("FSWZUABVH05", OracleType.NVarChar).Value = dwData["FSWZUABVH05"].ToString(); 
          or1.Parameters.Add("FSWZUABAK05", OracleType.NVarChar).Value = dwData["FSWZUABAK05"].ToString(); 
          or1.Parameters.Add("FSWZUABKU05", OracleType.NVarChar).Value = dwData["FSWZUABKU05"].ToString(); 
          or1.Parameters.Add("FSWZUART06", OracleType.NVarChar).Value = dwData["FSWZUART06"].ToString(); 
          or1.Parameters.Add("FSWPRGRP06", OracleType.NVarChar).Value = dwData["FSWPRGRP06"].ToString(); 
          or1.Parameters.Add("FSWZUABVH06", OracleType.NVarChar).Value = dwData["FSWZUABVH06"].ToString(); 
          or1.Parameters.Add("FSWZUABAK06", OracleType.NVarChar).Value = dwData["FSWZUABAK06"].ToString(); 
          or1.Parameters.Add("FSWZUABKU06", OracleType.NVarChar).Value = dwData["FSWZUABKU06"].ToString(); 
          or1.Parameters.Add("FSWZUART07", OracleType.NVarChar).Value = dwData["FSWZUART07"].ToString(); 
          or1.Parameters.Add("FSWPRGRP07", OracleType.NVarChar).Value = dwData["FSWPRGRP07"].ToString(); 
          or1.Parameters.Add("FSWZUABVH07", OracleType.NVarChar).Value = dwData["FSWZUABVH07"].ToString(); 
          or1.Parameters.Add("FSWZUABAK07", OracleType.NVarChar).Value = dwData["FSWZUABAK07"].ToString(); 
          or1.Parameters.Add("FSWZUABKU07", OracleType.NVarChar).Value = dwData["FSWZUABKU07"].ToString(); 
          or1.Parameters.Add("FSWZUART08", OracleType.NVarChar).Value = dwData["FSWZUART08"].ToString(); 
          or1.Parameters.Add("FSWPRGRP08", OracleType.NVarChar).Value = dwData["FSWPRGRP08"].ToString(); 
          or1.Parameters.Add("FSWZUABVH08", OracleType.NVarChar).Value = dwData["FSWZUABVH08"].ToString(); 
          or1.Parameters.Add("FSWZUABAK08", OracleType.NVarChar).Value = dwData["FSWZUABAK08"].ToString(); 
          or1.Parameters.Add("FSWZUABKU08", OracleType.NVarChar).Value = dwData["FSWZUABKU08"].ToString(); 
          or1.Parameters.Add("FSWZUART09", OracleType.NVarChar).Value = dwData["FSWZUART09"].ToString(); 
          or1.Parameters.Add("FSWPRGRP09", OracleType.NVarChar).Value = dwData["FSWPRGRP09"].ToString(); 
          or1.Parameters.Add("FSWZUABVH09", OracleType.NVarChar).Value = dwData["FSWZUABVH09"].ToString(); 
          or1.Parameters.Add("FSWZUABAK09", OracleType.NVarChar).Value = dwData["FSWZUABAK09"].ToString(); 
          or1.Parameters.Add("FSWZUABKU09", OracleType.NVarChar).Value = dwData["FSWZUABKU09"].ToString(); 
          or1.Parameters.Add("FSWZUART10", OracleType.NVarChar).Value = dwData["FSWZUART10"].ToString(); 
          or1.Parameters.Add("FSWPRGRP10", OracleType.NVarChar).Value = dwData["FSWPRGRP10"].ToString(); 
          or1.Parameters.Add("FSWZUABVH10", OracleType.NVarChar).Value = dwData["FSWZUABVH10"].ToString(); 
          or1.Parameters.Add("FSWZUABAK10", OracleType.NVarChar).Value = dwData["FSWZUABAK10"].ToString(); 
          or1.Parameters.Add("FSWZUABKU10", OracleType.NVarChar).Value = dwData["FSWZUABKU10"].ToString(); 
          or1.Parameters.Add("FSWZUART11", OracleType.NVarChar).Value = dwData["FSWZUART11"].ToString(); 
          or1.Parameters.Add("FSWPRGRP11", OracleType.NVarChar).Value = dwData["FSWPRGRP11"].ToString(); 
          or1.Parameters.Add("FSWZUABVH11", OracleType.NVarChar).Value = dwData["FSWZUABVH11"].ToString(); 
          or1.Parameters.Add("FSWZUABAK11", OracleType.NVarChar).Value = dwData["FSWZUABAK11"].ToString(); 
          or1.Parameters.Add("FSWZUABKU11", OracleType.NVarChar).Value = dwData["FSWZUABKU11"].ToString(); 
          or1.Parameters.Add("FSWZUART12", OracleType.NVarChar).Value = dwData["FSWZUART12"].ToString(); 
          or1.Parameters.Add("FSWPRGRP12", OracleType.NVarChar).Value = dwData["FSWPRGRP12"].ToString(); 
          or1.Parameters.Add("FSWZUABVH12", OracleType.NVarChar).Value = dwData["FSWZUABVH12"].ToString(); 
          or1.Parameters.Add("FSWZUABAK12", OracleType.NVarChar).Value = dwData["FSWZUABAK12"].ToString(); 
          or1.Parameters.Add("FSWZUABKU12", OracleType.NVarChar).Value = dwData["FSWZUABKU12"].ToString(); 
          or1.Parameters.Add("FSWZUART13", OracleType.NVarChar).Value = dwData["FSWZUART13"].ToString(); 
          or1.Parameters.Add("FSWPRGRP13", OracleType.NVarChar).Value = dwData["FSWPRGRP13"].ToString(); 
          or1.Parameters.Add("FSWZUABVH13", OracleType.NVarChar).Value = dwData["FSWZUABVH13"].ToString(); 
          or1.Parameters.Add("FSWZUABAK13", OracleType.NVarChar).Value = dwData["FSWZUABAK13"].ToString(); 
          or1.Parameters.Add("FSWZUABKU13", OracleType.NVarChar).Value = dwData["FSWZUABKU13"].ToString(); 
          or1.Parameters.Add("FSWZUART14", OracleType.NVarChar).Value = dwData["FSWZUART14"].ToString(); 
          or1.Parameters.Add("FSWPRGRP14", OracleType.NVarChar).Value = dwData["FSWPRGRP14"].ToString(); 
          or1.Parameters.Add("FSWZUABVH14", OracleType.NVarChar).Value = dwData["FSWZUABVH14"].ToString(); 
          or1.Parameters.Add("FSWZUABAK14", OracleType.NVarChar).Value = dwData["FSWZUABAK14"].ToString(); 
          or1.Parameters.Add("FSWZUABKU14", OracleType.NVarChar).Value = dwData["FSWZUABKU14"].ToString(); 
          or1.Parameters.Add("FSWZUART15", OracleType.NVarChar).Value = dwData["FSWZUART15"].ToString(); 
          or1.Parameters.Add("FSWPRGRP15", OracleType.NVarChar).Value = dwData["FSWPRGRP15"].ToString(); 
          or1.Parameters.Add("FSWZUABVH15", OracleType.NVarChar).Value = dwData["FSWZUABVH15"].ToString(); 
          or1.Parameters.Add("FSWZUABAK15", OracleType.NVarChar).Value = dwData["FSWZUABAK15"].ToString(); 
          or1.Parameters.Add("FSWZUABKU15", OracleType.NVarChar).Value = dwData["FSWZUABKU15"].ToString(); 
          or1.Parameters.Add("FSWZUART16", OracleType.NVarChar).Value = dwData["FSWZUART16"].ToString(); 
          or1.Parameters.Add("FSWPRGRP16", OracleType.NVarChar).Value = dwData["FSWPRGRP16"].ToString(); 
          or1.Parameters.Add("FSWZUABVH16", OracleType.NVarChar).Value = dwData["FSWZUABVH16"].ToString(); 
          or1.Parameters.Add("FSWZUABAK16", OracleType.NVarChar).Value = dwData["FSWZUABAK16"].ToString(); 
          or1.Parameters.Add("FSWZUABKU16", OracleType.NVarChar).Value = dwData["FSWZUABKU16"].ToString(); 
          or1.Parameters.Add("FSWZUART17", OracleType.NVarChar).Value = dwData["FSWZUART17"].ToString(); 
          or1.Parameters.Add("FSWPRGRP17", OracleType.NVarChar).Value = dwData["FSWPRGRP17"].ToString(); 
          or1.Parameters.Add("FSWZUABVH17", OracleType.NVarChar).Value = dwData["FSWZUABVH17"].ToString(); 
          or1.Parameters.Add("FSWZUABAK17", OracleType.NVarChar).Value = dwData["FSWZUABAK17"].ToString(); 
          or1.Parameters.Add("FSWZUABKU17", OracleType.NVarChar).Value = dwData["FSWZUABKU17"].ToString(); 
          or1.Parameters.Add("FSWZUART18", OracleType.NVarChar).Value = dwData["FSWZUART18"].ToString(); 
          or1.Parameters.Add("FSWPRGRP18", OracleType.NVarChar).Value = dwData["FSWPRGRP18"].ToString(); 
          or1.Parameters.Add("FSWZUABVH18", OracleType.NVarChar).Value = dwData["FSWZUABVH18"].ToString(); 
          or1.Parameters.Add("FSWZUABAK18", OracleType.NVarChar).Value = dwData["FSWZUABAK18"].ToString(); 
          or1.Parameters.Add("FSWZUABKU18", OracleType.NVarChar).Value = dwData["FSWZUABKU18"].ToString(); 
          or1.Parameters.Add("FSWZUART19", OracleType.NVarChar).Value = dwData["FSWZUART19"].ToString(); 
          or1.Parameters.Add("FSWPRGRP19", OracleType.NVarChar).Value = dwData["FSWPRGRP19"].ToString(); 
          or1.Parameters.Add("FSWZUABVH19", OracleType.NVarChar).Value = dwData["FSWZUABVH19"].ToString(); 
          or1.Parameters.Add("FSWZUABAK19", OracleType.NVarChar).Value = dwData["FSWZUABAK19"].ToString(); 
          or1.Parameters.Add("FSWZUABKU19", OracleType.NVarChar).Value = dwData["FSWZUABKU19"].ToString(); 
          or1.Parameters.Add("FSWZUART20", OracleType.NVarChar).Value = dwData["FSWZUART20"].ToString(); 
          or1.Parameters.Add("FSWPRGRP20", OracleType.NVarChar).Value = dwData["FSWPRGRP20"].ToString(); 
          or1.Parameters.Add("FSWZUABVH20", OracleType.NVarChar).Value = dwData["FSWZUABVH20"].ToString(); 
          or1.Parameters.Add("FSWZUABAK20", OracleType.NVarChar).Value = dwData["FSWZUABAK20"].ToString(); 
          or1.Parameters.Add("FSWZUABKU20", OracleType.NVarChar).Value = dwData["FSWZUABKU20"].ToString(); 
          or1.Parameters.Add("FSWZS01", OracleType.NVarChar).Value = dwData["FSWZS01"].ToString(); 
          or1.Parameters.Add("FSWZSABVH01", OracleType.NVarChar).Value = dwData["FSWZSABVH01"].ToString(); 
          or1.Parameters.Add("FSWZSABAK01", OracleType.NVarChar).Value = dwData["FSWZSABAK01"].ToString(); 
          or1.Parameters.Add("FSWZSABKU01", OracleType.NVarChar).Value = dwData["FSWZSABKU01"].ToString(); 
          or1.Parameters.Add("FSWZS02", OracleType.NVarChar).Value = dwData["FSWZS02"].ToString(); 
          or1.Parameters.Add("FSWZSABVH02", OracleType.NVarChar).Value = dwData["FSWZSABVH02"].ToString(); 
          or1.Parameters.Add("FSWZSABAK02", OracleType.NVarChar).Value = dwData["FSWZSABAK02"].ToString(); 
          or1.Parameters.Add("FSWZSABKU02", OracleType.NVarChar).Value = dwData["FSWZSABKU02"].ToString(); 
          or1.Parameters.Add("FSWZS03", OracleType.NVarChar).Value = dwData["FSWZS03"].ToString(); 
          or1.Parameters.Add("FSWZSABVH03", OracleType.NVarChar).Value = dwData["FSWZSABVH03"].ToString(); 
          or1.Parameters.Add("FSWZSABAK03", OracleType.NVarChar).Value = dwData["FSWZSABAK03"].ToString(); 
          or1.Parameters.Add("FSWZSABKU03", OracleType.NVarChar).Value = dwData["FSWZSABKU03"].ToString(); 
          or1.Parameters.Add("FSWZS04", OracleType.NVarChar).Value = dwData["FSWZS04"].ToString(); 
          or1.Parameters.Add("FSWZSABVH04", OracleType.NVarChar).Value = dwData["FSWZSABVH04"].ToString(); 
          or1.Parameters.Add("FSWZSABAK04", OracleType.NVarChar).Value = dwData["FSWZSABAK04"].ToString(); 
          or1.Parameters.Add("FSWZSABKU04", OracleType.NVarChar).Value = dwData["FSWZSABKU04"].ToString(); 
          or1.Parameters.Add("FSWZS05", OracleType.NVarChar).Value = dwData["FSWZS05"].ToString(); 
          or1.Parameters.Add("FSWZSABVH05", OracleType.NVarChar).Value = dwData["FSWZSABVH05"].ToString(); 
          or1.Parameters.Add("FSWZSABAK05", OracleType.NVarChar).Value = dwData["FSWZSABAK05"].ToString(); 
          or1.Parameters.Add("FSWZSABKU05", OracleType.NVarChar).Value = dwData["FSWZSABKU05"].ToString(); 
          or1.Parameters.Add("FSWZS06", OracleType.NVarChar).Value = dwData["FSWZS06"].ToString(); 
          or1.Parameters.Add("FSWZSABVH06", OracleType.NVarChar).Value = dwData["FSWZSABVH06"].ToString(); 
          or1.Parameters.Add("FSWZSABAK06", OracleType.NVarChar).Value = dwData["FSWZSABAK06"].ToString(); 
          or1.Parameters.Add("FSWZSABKU06", OracleType.NVarChar).Value = dwData["FSWZSABKU06"].ToString(); 
          or1.Parameters.Add("FSWFILLER", OracleType.NVarChar).Value = dwData["FSWFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
